<?php get_header(); ?>

  <div id="content">
  <?php if (have_posts()) : ?>
	<?php while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
      <?php if(is_home()) echo '<div class="count">', comments_popup_link('0<br />留言', '1<br />留言', '%<br />留言'), '</div>';?>
      <!-- google_ad_section_start -->
      <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="永久链接<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
      <!-- google_ad_section_end -->
      <p class="post-meta">
        <?php the_time('Y年n月j日') ?> | 由<?php the_author() ?>发表<?php if(function_exists('the_views')) { echo ' | ';the_views(); } ?><br />
        <?php the_tags('标签: ', ', ', ''); ?> 发布于<?php the_category(', ') ?> <?php edit_post_link('编辑', ' | ', ''); ?>
      </p>
      <!-- google_ad_section_start -->
	  <div class="entry">
        <?php the_content('阅读全文&raquo;'); ?>
        <div class="link-pages"><?php wp_link_pages(); ?></div>
      </div>
      <!-- google_ad_section_end -->
    </div>
    
  <?php comments_template(); ?>
  
  <?php endwhile;?>
    <div class="navigation">
  <?php if(function_exists('wp_pagenavi')){wp_pagenavi();}else{?>
		<div class="alignleft"><?php next_posts_link('&laquo;以往的文章') ?></div>
		<div class="alignright"><?php previous_posts_link('更新的文章&raquo;') ?></div>
  <?php }?>
	</div>
  <?php else: ?>
  
  	<h2 class="center">无发现</h2>
	<p class="center">很抱歉，没有找到你寻找的页面。你可以利用下面的搜索工具搜索一下。</p>
    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
      <div>
        <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="Search" />
      </div>
    </form>

  <?php endif; ?>
  
  </div>
  
<?php get_sidebar(); ?>
<?php get_footer(); ?>